package biz.obake.team.touchprotector.donation;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.c;
import biz.obake.team.touchprotector.R;
import biz.obake.team.touchprotector.g.c;
import com.android.billingclient.api.l;
import java.util.List;

public class DonateActivity extends c implements View.OnClickListener, c.b {
    private void G() {
        List<l> r = a.q().r();
        if (r != null) {
            for (l next : r) {
                Button button = (Button) findViewById(biz.obake.team.touchprotector.c.v(next.b()));
                if (button != null) {
                    button.setTag(next);
                    button.setText(next.a());
                    button.setOnClickListener(this);
                    button.setVisibility(0);
                }
            }
        }
    }

    public void onClick(View view) {
        a.q().t((l) view.getTag(), this);
        finish();
    }

    /* access modifiers changed from: protected */
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(a.p() ? R.layout.donation_donate_more_activity : R.layout.donation_donate_activity);
        G();
    }

    /* access modifiers changed from: protected */
    public void onPause() {
        super.onPause();
        biz.obake.team.touchprotector.g.c.h(this);
    }

    public void onRamPrefsChanged(String str) {
        if ("Donation.SkuChanged".equals(str)) {
            G();
        }
    }

    /* access modifiers changed from: protected */
    public void onResume() {
        super.onResume();
        biz.obake.team.touchprotector.g.c.e(this);
        a.q().v();
    }
}
